package com.bwie.goods.controller;

import com.bwie.common.domain.City;
import com.bwie.common.result.Result;
import com.bwie.goods.service.CityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/City")
public class CityController {
    @Autowired
    CityService cityService;

    /**
     * 城市列表
     * @return
     */
    @PostMapping("/list")
    public Result<List<City>> list(){
        Result<List<City>> list=cityService.list();
        return list;
    }
}
